	<meta charset="utf-8"/>
	<script src="../../js/mui.min.js"></script>
        <script src="../../js/index.js"></script>  
        <script src="../../js/jquery-1.9.1.min.js"></script>
        
        <script type="text/javascript">
        mui.plusReady(function() { 
        	// 隐藏滚动条
            plus.webview.currentWebview().setStyle({scrollIndicator:'none'});
		    //图片轮播，获得slider插件对象
            var gallery = mui('.mui-slider');
            gallery.slider({
                interval:5000//自动轮播周期，若为0则不自动播放，默认为0；
            });
            
          /*var list = document.getElementsByClassName('mui-table-view-cell');
		  for(var i = 0;i<list.length;i++){
		  	list[i].addEventListener('tap', function() {
               mui.openWindow({
                   url: 'communityDetail.html', 
                   id:'communityDetail'
               });
		    });
		  }*/
		  //下拉刷新
//		  mui.init({
//				pullRefresh: {
//					container: '#pullrefresh',
//					down: {
//						callback: pulldownRefresh
//					},
//					up: {
//						contentrefresh: '正在加载...',
//						callback: pullupRefresh
//					}
//				}
//			});
//			/**
//			 * 下拉刷新具体业务实现
//			 */
//			function pulldownRefresh() {
//				setTimeout(function() {
//					var table = document.body.querySelector('.mui-table-view');
//					var cells = document.body.querySelectorAll('.mui-table-view-cell');
//					for (var i = cells.length, len = i + 3; i < len; i++) {
//						var li = document.createElement('li');
//						li.className = 'mui-table-view-cell';
//						li.innerHTML = '<a class="mui-navigate-right">Item ' + (i + 1) + '</a>';
//						//下拉刷新，新纪录插到最前面；
//						table.insertBefore(li, table.firstChild);
//					}
//					mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
//				}, 1500);
//			}
//			var count = 0;
//			/**
//			 * 上拉加载具体业务实现
//			 */
//			function pullupRefresh() {
//				setTimeout(function() {
//					mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
//					var table = document.body.querySelector('.mui-table-view');
//					var cells = document.body.querySelectorAll('.mui-table-view-cell');
//					for (var i = cells.length, len = i + 20; i < len; i++) {
//						var li = document.createElement('li');
//						li.className = 'mui-table-view-cell';
//						li.innerHTML = '<a class="mui-navigate-right">Item ' + (i + 1) + '</a>';
//						table.appendChild(li);
//					}
//				}, 1500);
//			}
//			if (mui.os.plus) {
//				mui.plusReady(function() {
//					setTimeout(function() {
//						mui('#pullrefresh').pullRefresh().pullupLoading();
//					}, 1000);
//
//				});
//			} else {
//				mui.ready(function() {
//					mui('#pullrefresh').pullRefresh().pullupLoading();
//				});
//			}
		  
            //进入首页面
            document.getElementById('indexTab').addEventListener('tap', function() {
                mui.openWindow({
                    url: '../../index.html', 
                    id:'index'
                });
            }); 
            //进入社区页面
            document.getElementById('communityTab').addEventListener('tap', function() {
            	var userinfo = plus.storage.getItem('userinfo');
            	if (userinfo != '' && userinfo != null) {
            		mui.openWindow({
                        url: '../../community.html', 
                        id:'community'
                   }); 
            	} else{
            		mui.openWindow({
                        url: '../../login.html', 
                        id:'login'
                    });
            	}
                
            }); 
            
            //进入个人中心页面
            document.getElementById('dataTab').addEventListener('tap', function() {
            	var userinfo = plus.storage.getItem('userinfo');
            	if (userinfo != '' && userinfo != null) {
	                mui.openWindow({
	                    url: '../../data.html', 
	                    id:'data'
	                });
            	} else{
            		mui.openWindow({
                        url: '../../login.html', 
                        id:'login'
                    });
            	}
            });
            
            //社区列表展示
            var self = plus.webview.currentWebview();
      		var user_id= self.user_id;
//    		var user_id = plus.storage.getItem('user_id');
      		if(user_id == undefined){
      			user_id = '';
      		}
        	var str= "";
			rr(user_id,str)
            
            
            $(".nav_list a").click(function(){
        	var stri = $(this).html();
            	rr(user_id,stri)
                $(this).addClass("select");
                $(this).parent().siblings().find("a").removeClass("select");
            });
            
        });
        function rr(user_id,str){
    	            mui.ajax({ //ajax请求
					url: getServerIp + 'AppNote/noteList',
					type: 'GET',
					data: {    
						id:user_id,str:str
					}, //传参
					success: function(data, textStatus, jqXHR) {
						document.getElementById('noteList').innerHTML = "";
						var table = document.body.querySelector('#noteList');
					//	var obj = JSON.parse(data);
					var list =  data.noteList;
					if(list == null || list == ''){
						var li = document.createElement('li');
						li.innerHTML = "暂无数据"
						table.appendChild(li);
					}else{
						var list_count = list.length;
						for(var i = 0;i<list_count;i++){
						   var obj = list[i];
	    					var li = document.createElement('li');
	    					//新增id属性
	    					li.id = obj.id;
	    					li.title = obj.title;
								li.className = 'mui-table-view-cell mui-media';
								li.innerHTML = '<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">';
								if (obj.top == '1') {
								    li.innerHTML += '<span style="width: 20px;height: 20px;background-color: #C8902A;position: absolute;margin-left: -15px;">顶</span>';
								}
							
							li.innerHTML += '<div class="mui-media-body" style="max-height: 80px;padding-left:5px;">'+
							'<p class="com_content">'+obj.title+'</p>'+
//							'<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">'+  //帖子图片
							'</div><div style="padding: 10px 0;">'+
							'<p class="mui-ellipsis" style="float: left;">'+obj.username+'</p>'+
							'<p style="float: right;">'+
							obj.days+'天前&nbsp;&nbsp;&nbsp;&nbsp;'+
							'观看&nbsp;<span style="color: #83E5AB;">'+obj.number+'</span>&nbsp;&nbsp;&nbsp;&nbsp;'+
							'回复&nbsp;<span style="color: #83E5AB;">'+obj.note_count+'</span>'+
							'</p></div></li>';
	                        table.appendChild(li);
	                        
						}
					}
					//打开帖子详情页
					var ls = document.getElementsByClassName('mui-table-view-cell');
					  	for(var i = 0;i<ls.length;i++){
					  		ls[i].addEventListener('tap', function() {
			               	mui.openWindow({
			                   	url: 'communityDetail.html', 
			                   	id:'communityDetail',
			                   	extras: {
									type:this.getAttribute("id"),title:this.getAttribute("title")
								}
			               });
					    });
					  }
					
					
							
							
					}
				})
        }
        </script>
	<link rel="stylesheet" href="../../css/mui.min.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			.mui-bar-nav~.mui-content {
				padding: 0;
			}
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
			.com_content {
				color: #000;
                font-size: 18px;
                width: 70%;
                float: left;
                max-height: 80px;
			}
			.mui-table-view-chevron .mui-table-view-cell {
                padding-right: 15px;
            }
            
			.nav{
				height:65px;
				background: #ddd;
			}
			.nav ul{
				list-style:none;
				padding: 0;
				margin-left: 0;
			}
			.nav ul li{
				float:left;
				width:25%;
				margin-top: 10px;
				text-align: center;
			}
			.nav ul li a{
				color: black;
			}
			.nav ul li .select{
				color: black;
                border-radius: 15px;
                background: #83E5AB;
                padding: 3px 5px;
			}
			.cur{
				color:darkcyan;
			}
		</style>

        <div class="nav">  
		    <ul id="wy">       
			    <li class="nav_list "><a class="select">体验说说</a></li>
			    <li class="nav_list"><a>学习交流</a></li>
			    <li class="nav_list"><a>成长日记</a></li> 
			    <li class="nav_list"><a>意见反馈</a></li>  
		    </ul>
	    </div>
		<!--下拉刷新容器-->
		<div id="pullrefresh" class="mui-content mui-scroll-wrapper" style="top:40px;">
			<div class="mui-scroll">
				<!--数据列表-->
			<ul class="mui-table-view mui-table-view-chevron" style="margin-bottom: 50px;" id="noteList">
				<!--<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
					    <span style="width: 20px;height: 20px;background-color: #C8902A;position: absolute;margin-left: -25px;">顶</span>
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
					    <span style="width: 20px;height: 20px;background-color: #2AC845;position: absolute;margin-left: -25px;">新</span>
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>
				<li class="mui-table-view-cell mui-media" style="padding-right: 15px;padding-left: 25px;">
						<div class="mui-media-body" style="max-height: 80px;">
							<p class="com_content">别样六一节，童年不一样，让爱传出去，大爱满人间！</p>
							<img class="mui-media-object mui-pull-right" src="../../images/cbd.jpg">
						</div>
						<div style="padding: 10px 0;">
							<p class='mui-ellipsis' style="float: left;">Baby妈咪</p>
							<p style="float: right;">
								14分钟前&nbsp;&nbsp;&nbsp;&nbsp;
								观看&nbsp;<span style="color: #83E5AB;">20</span>&nbsp;&nbsp;&nbsp;&nbsp;
								回复&nbsp;<span style="color: #83E5AB;">200</span>
							</p>
						</div>
				</li>-->
			</ul>
		</div>
	</div>

		<nav class="mui-bar mui-bar-tab" style="background: #E4E9EA;">
			<a id="indexTab" class="mui-tab-item" href="index.html">
				<span class="mui-icon mui-icon-home"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a id="communityTab" class="mui-tab-item mui-active" href="community.html">
				<span class="mui-icon mui-icon-pengyouquan"></span>
				<span class="mui-tab-label">社区</span>
			</a>
			<a id="dataTab" class="mui-tab-item" href="data.html">
				<span class="mui-icon mui-icon-contact"></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>